package org.example;

public class IntermediaryJdkProxyFactory {
    public static <T>T create(Object target){
        IntermediaryInvocationHandler handler=new IntermediaryInvocationHandler();
        handler.setTarget(target);
        return (T)Package.newProxyInstance(target.getClass().getClassLoader(),target.getClass().getInterfaces(),handler);
    }
}
